Skip to content

Improve postinstall message to detect existing Chrome installations#815

Merged
ctate merged 2 commits intomainfrom
fix/issue-814-1773560763172
Mar 15, 2026
Merged

Improve postinstall message to detect existing Chrome installations#815
ctate merged 2 commits intomainfrom
fix/issue-814-1773560763172

Conversation

@ctate
Copy link
Collaborator

@ctate ctate commented Mar 15, 2026

Previously, the npm postinstall script always recommended running agent-browser install to download Chrome for Testing, even when users already had a working Chrome installation on their system.

This change adds Chrome detection logic to the postinstall script that mirrors the runtime behavior:

  • Checks for system Chrome installations on macOS, Linux, and Windows
  • Shows a success message when Chrome is found, indicating it will be used automatically
  • Only shows the agent-browser install warning when no Chrome is detected
  • Provides platform-specific guidance (Linux --with-deps flag, --executable-path alternative)

The detection logic matches the existing Rust find_chrome() implementation to ensure consistency between postinstall messaging and runtime behavior.

Fixes #814

Previously, the npm postinstall script always recommended running `agent-browser install` to download Chrome for Testing, even when users already had a working Chrome installation on their system.

This change adds Chrome detection logic to the postinstall script that mirrors the runtime behavior:

- Checks for system Chrome installations on macOS, Linux, and Windows
- Shows a success message when Chrome is found, indicating it will be used automatically
- Only shows the `agent-browser install` warning when no Chrome is detected
- Provides platform-specific guidance (Linux `--with-deps` flag, `--executable-path` alternative)

The detection logic matches the existing Rust `find_chrome()` implementation to ensure consistency between postinstall messaging and runtime behavior.

Fixes #814
@vercel
Copy link
Contributor

vercel bot commented Mar 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agent-browser Ready Ready Preview, Comment Mar 15, 2026 7:53am
agent-browser-env-demo Ready Ready Preview, Comment Mar 15, 2026 7:53am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do I still need to run 'agent-browser install' when installing with brew on MacOS?

1 participant